using Autofac;
using SapaFinance.GenericRepository;

namespace SapaFinance.UI
{
    public class SpecificationLocatorStub : ISpecificationLocator
    {
        public SpecificationLocatorStub(IContainer container)
        {
            Container = container;
        }

        protected IContainer Container { get; private set; }

        #region ISpecificationLocator Members

        public TSpecification Resolve<TSpecification, TEntity>()
            where TSpecification : ISpecification<TEntity>
            where TEntity : class
        {
            //using (var scope = Container.BeginLifetimeScope()){
                return Container.Resolve<TSpecification>();
            //}
        }

        #endregion
    }
}